<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSpotsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('spots', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('uid')->comment('关联发表基地用户');
            $table->integer('cid')->comment('关联基地分类id');
            $table->string('name')->comment('基地名');
            $table->string('price')->comment('门票价格');
            $table->string('trip')->comment('行程');
            $table->text('set_meal')->comment('套餐介绍');
            $table->longText('details')->nullable()->comment('基地详情');
            $table->longText('explain')->nullable()->comment('套餐说明');
            $table->string('score')->nullable()->comment('评分');
            $table->integer('state')->default(0)->comment('0为待审核状态，1为审核通过状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('spots');
    }
}
